namespace ChumChase.Commands
{
    using Caliburn.MVP.Presenters;
    using Model;

    public abstract class DisplayPresenter<T> : CommandBase where T : IPresenter
    {
        private readonly IApplicationModel _application;
        private readonly T _presenter;

        protected DisplayPresenter(IApplicationModel application, T presenter)
        {
            _application = application;
            _presenter = presenter;
        }

        public override void Execute(object parameter)
        {
            _application.Open(_presenter);
        }
    }
}